package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.LacontrolmangementDTO;
import com.lening.iot.po.LacontrolmangementPO;
import com.lening.iot.service.LacontrolmangementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:59
 */
@RestController
@RequestMapping("/lacontrolmangements")
public class LacontrolmangementController extends BaseController<LacontrolmangementPO, LacontrolmangementDTO, LacontrolmangementService> {
    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private LacontrolmangementService lacontrolmangementService;
    @GetMapping("/getAllLam")
    public Page<LacontrolmangementDTO> getAllAcl(Page<LacontrolmangementDTO> lacontrolmangementDTOPage){
        Page<LacontrolmangementDTO> lamList = lacontrolmangementService.getAllLam(lacontrolmangementDTOPage);
        return lamList;
    }

//    @Override
//    public Page<?> page(LacontrolmangementDTO lacontrolmangementDTO) {
//        return lacontrolmangementService.getAllLam(lacontrolmangementDTO);
//    }
@GetMapping("/getAll")
public List<LacontrolmangementDTO> getAll(String communityName) {
return lacontrolmangementService.getAll(communityName);
}
}
